package com.xoms.admin.controller.springmvc.req;


import org.hibernate.validator.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 增加/修改资源信息
 **/
public class EditResourceParam {
	private String rid; // 资源id
	@NotEmpty(message = "父级id不能为空")
	private String pid; // 父级id
	@NotEmpty(message = "资源名称不能为空")
	private String name; // 资源名称
	@NotEmpty(message = "资源路径不能为空")
	private String url; // 资源路径
	@NotEmpty(message = "资源类型不能为空")
	private String type; // 资源类型 1:菜单 2:按钮 
	@Pattern(regexp = "^1|2$", message = "1:一级菜单  2:二级菜单 3:按钮")
	private String level; //  菜单级别 1:一级菜单  2:二级菜单 3:按钮
	@Pattern(regexp = "^1|0$", message = "是否启用 1启用 0不启用")
	private String isEnable; // 是否启用 1启用 非1不启用
	private String resDesc; //  资源描述
	private String sort; //  排序

	public void setRid(String rid) {
 		this.rid = rid;
	}

	public String getRid() {
 		return rid;
	}

	public void setPid(String pid) {
 		this.pid = pid;
	}

	public String getPid() {
 		return pid;
	}

	public void setName(String name) {
 		this.name = name;
	}

	public String getName() {
 		return name;
	}

	public void setUrl(String url) {
 		this.url = url;
	}

	public String getUrl() {
 		return url;
	}

	public void setType(String type) {
 		this.type = type;
	}

	public String getType() {
 		return type;
	}

	public void setLevel(String level) {
 		this.level = level;
	}

	public String getLevel() {
 		return level;
	}

	public void setIsEnable(String isEnable) {
 		this.isEnable = isEnable;
	}

	public String getIsEnable() {
 		return isEnable;
	}

	public void setResDesc(String resDesc) {
 		this.resDesc = resDesc;
	}

	public String getResDesc() {
 		return resDesc;
	}

	public void setSort(String sort) {
 		this.sort = sort;
	}

	public String getSort() {
 		return sort;
	}

}
